package org.spark.api.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.spark.api.annotation.HBaseColumn;
import org.spark.api.annotation.HBaseTable;

import java.io.Serializable;

/**
 * 达人
 * @author chenwy
 */
@HBaseTable(namespace = "dy", qualifier = "author")
public class Author implements Serializable {

    @HBaseColumn(column = "ai")
    private String authorId;

    @HBaseColumn(column = "si")
    private String shortId;

    @HBaseColumn(column = "nn")
    private String nickname;

    @HBaseColumn(column = "l")
    private String label;

    @HBaseColumn(column = "g")
    private int gender;

    @HBaseColumn(column = "age")
    private int age;

    @HBaseColumn(column = "frc")
    private long followerCount;

    @HBaseColumn(column = "a")
    private String avatar;

    public String getAuthorId() {
        return authorId;
    }

    @JsonProperty("author_id")
    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getShortId() {
        return shortId;
    }

    @JsonProperty("short_id")
    public void setShortId(String shortId) {
        this.shortId = shortId;
    }

    public String getNickname() {
        return nickname;
    }

    @JsonProperty("nickname")
    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getLabel() {
        return label;
    }

    @JsonProperty("label")
    public void setLabel(String label) {
        this.label = label;
    }

    public int getGender() {
        return gender;
    }

    @JsonProperty("gender")
    public void setGender(int gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    @JsonProperty("age")
    public void setAge(int age) {
        this.age = age;
    }

    public long getFollowerCount() {
        return followerCount;
    }

    @JsonProperty("follower_count")
    public void setFollowerCount(long followerCount) {
        this.followerCount = followerCount;
    }

    public String getAvatar() {
        return avatar;
    }

    @JsonProperty("avatar")
    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Override
    public String toString() {
        return "Author{" +
                "authorId='" + authorId + '\'' +
                ", shortId='" + shortId + '\'' +
                ", nickname='" + nickname + '\'' +
                ", label='" + label + '\'' +
                ", gender=" + gender +
                ", age=" + age +
                ", followerCount=" + followerCount +
                ", avatar='" + avatar + '\'' +
                '}';
    }
}
